 <!DOCTYPE html>
<html>
<head>
<base href="${basePath}">
<meta charset="UTF-8">
<title>会员购买商品记录</title>
$!{include("import_js_css.html")}
</head>
<body>
	$!{include("header.html")}
	<div class="container" style="width: 1200px;">
		<div class="panel panel-info">
			<!--#var(Member member)-->
			$!{include("memberHeader.html")}
			<div id="div_result_member" style="padding: 15px;">
				<div class="panel">
					$!{include("member_info_tab.html")}
					<div id="div_result_member" class="panel-hxcd-info">
						<!--#var(GoodsOrderDetail goodsOrderDetail, PaginatedList<GoodsOrderDetail> goodsOrderDetails)-->
						<!--
						#set(
						pager = goodsOrderDetails.pager,
						totalResults = pager.getCountOfTotalResults(),
						totalPages = pager.getCountOfTotalPages() * 1,
						pageSize = pager.pageSize,
						pageNo = pager.pageNo,
						prePageNo = pager.getPrevPageNo(),
						nextPageNo = pager.getNextPageNo()
						)
						-->
						<div class="panel-heading">
							<div class="btn-group btn-group-sm btn-gp-default">
								<button id="btn_edit" type="button"
									class="btn btn-default " onclick="window.location.href='yueyogaAdmin/toBuyGoods.jhtml?id=${member.memberid}'">购买商品</button>
							</div>
						</div>
						<!--#if(totalResults== null || totalResults==0)-->
						<div class="panel-body">
							<p>没有符合条件的数据</p>
						</div>
						<!--#else-->
						<table class="table table-bordered table-hover table-condensed tb" style="text-align: center;">
							<tr>
								<td>商品编号</td>
								<td>商品名称</td>
								<td>商品价格(元)</td>
								<td>购买数量</td>
								<td>商品折扣</td>
								<td>商品总价(元)</td>
								<td>购买时间</td>
							</tr>
							<!--#foreach(goodsOrderDetail in goodsOrderDetails)-->
							<tr>
								<td>${goodsOrderDetail.goods.code}</td>
								<td>${goodsOrderDetail.goods.name}</td>
								<td>${goodsOrderDetail.goods.price}</td>
								<td>${goodsOrderDetail.counts}</td>
								<td>${goodsOrderDetail.order.discount}</td>
								<td>${goodsOrderDetail.counts.toDouble * goodsOrderDetail.goods.price.toDouble - goodsOrderDetail.order.discount.toDouble}</td>
								<td>${goodsOrderDetail.inputTime.toDate("yyyy-MM-dd HH:mm:ss")}</td>
							<tr>
							<!--#end-->
						</table>
						<div class="gzce-pagering">
							<ul class="pagination">
								<li><a href="yueyogaAdmin/toMemberGoods.jhtml?pageNo=1&id=${member.memberid}">首页</a></li>
								<!-- #if(prePageNo<=1) -->
								<li class="disabled"><a href="javascript:void(0)">上一页</a></li>
								<!-- #else -->
								<li><a href="yueyogaAdmin/toMemberGoods.jhtml?pageNo=${prePageNo}&id=${member.memberid}">上一页</a></li>
								<!-- #end -->
								<!-- #if(nextPageNo>=totalPages) -->
								<li class="disabled"><a href="javascript:void(0)">下一页</a></li>
								<!-- #else -->
								<li><a href="yueyogaAdmin/toMemberGoods.jhtml?pageNo=${nextPageNo}&id=${member.memberid}">下一页</a></li>
								<!-- #end -->
								<li><a href="yueyogaAdmin/toMemberGoods.jhtml?pageNo=${totalPages}&id=${member.memberid}">尾页</a></li>
								<li><a>第<input id="txtPageNumber" value="${pageNo}"
										onkeydown="this.value=this.value.replace(/\D/g,'')"
										onkeyup="changePage(this.value)"
										onafterpaste="this.value=this.value.replace(/\D/g,'')" type="text" />&nbsp;页&nbsp;~&nbsp;共${totalPages}页/${totalResults}条
								</a></li>
							</ul>
						</div>
						<!--#end-->
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<script type="text/javascript">
		$(function(){
			var msg = "${msg}";
			if(msg!=null&&msg!=""){
				alert(msg);
			}
		});
		function searchsubArea(level){
			var sonArea;
			var parentId=0;
			if(level==1){
				parentId=$("#inputProvince").val();
				sonArea=$("#inputCity");
			}else if(level==2){
				parentId=$("#inputCity").val();
				sonArea=$("#inputArea");
			}else{
				parentId=$("#inputArea").val();
				sonArea=$("#inputDomain");
			}
			if(parentId!=0){
				var url = "yueyogaAdmin/subArea.jhtml?level="+level+"&parentId="+parentId;
				$.post(url,function(response){
					if(response.success){
						sonArea.html(response.val);
					}
				}, "json");
			}
		}
		function searchMarketingChannel(){
			var marketingChannel=$("#inputMarketingChannel").val();
			if(marketingChannel!=null&&marketingChannel!=""){
				var url = "yueyogaAdmin/substatus.jhtml?code="+marketingChannel;
				$.post(url,function(response){
					if(response.success){
						$("#inputSubMarketingChannel").html(response.val);
					}
				}, "json");
			}
		}
		function changePage(value) {
			value = value * 1;
			var totalPages = '${totalPages}';
			if (value > totalPages) {
				value = totalPages;
			} else if (value < 1) {
				value = 1;
			}
			$("#txtPageNumber").val(value);
			goToPage(value);
		}
		function goToPage(pageNo) {
			$("#hidPageNo").val(pageNo);
			document.taskForm.submit();
		}
	</script>
</body>
</html>
